import java.util.Arrays;

public class Chapter14 {
    public static void main(String[] args) {
        int []a ={1,2,3,4,5};
        int []b=new int[a.length];
        for (int i =0;i<a.length;i++){
            b[b.length-1-i]=a[i];
        }
        a=b;
        System.out.println(Arrays.toString(a));
    }
}
